
import {Component} from 'react';
import {Context} from './parent'
class Five extends Component{
   
    render(){
        return(
            <div>
                <h5>组件5</h5>
                 <Context.Consumer>
                     {
                       (val)=>{
                              //console.log(val,"组件5***")
                           return <div>
                               <h5>{val.msg}</h5>
                               <p>{val.num}</p>
                           </div>   
                       }  
                     }
                 </Context.Consumer>
            </div>
        )
    }
}
export default Five